{extend name="public:base" /}

{block name="body"}

  <div class="layui-form" lay-filter="layuiadmin-form-tags" id="layuiadmin-app-form-tags" style="padding: 20px 30px 0 0 ; text-align: center;">
    <div class="layui-form-item">
      <label class="layui-form-label">分类名</label>
      <div class="layui-input-inline">
        <input type="text" name="tags" lay-verify="required" placeholder="分类名*" autocomplete="off" class="layui-input">
      </div>
	  <label class="layui-form-label">EN别名</label>
      <div class="layui-input-inline">
        <input type="text" name="ename" lay-verify="required" placeholder="英文名*" autocomplete="off" class="layui-input">
      </div>
	  <label class="layui-form-label">详情页模板</label>
	  <div class="layui-input-inline">
      <select name="detpl"  lay-filter="detpl">
		{volist name="template" id="vo"}
			<option value="{$vo}" {if($vo == $tplname)}selected{/if}>{$vo}</option>
		{/volist}
	  </select>
	  </div>
	  <label class="layui-form-label">图标</label>
      <div class="layui-input-inline">
        <input type="text" name="icon" placeholder="图标*" id="iconPicker" lay-filter="iconPicker" style="display:none;" class="layui-input">
      </div>
	  <label class="layui-form-label">描述</label>
      <div class="layui-input-inline">
        <input type="text" name="desc" lay-verify="required" placeholder="描述*" autocomplete="off" class="layui-input">
      </div>
    <label class="layui-form-label">排序</label>
      <div class="layui-input-inline">
        <input type="text" name="sort" lay-verify="required" placeholder="请填数字" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>

{/block}

{block name="js"}  
  <script>
  layui.config({
    base: '/static/admin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form', 'iconPicker'], function(){
    var $ = layui.$ 
    ,form = layui.form ;
	var iconPicker = layui.iconPicker;
	
	//初始化图标选择
	iconPicker.render({
		elem: '#iconPicker',
		type: 'fontClass',
		search: false,
		page: true,
		limit: 12,
		click: function (data) {
			//console.log(data);
		}
	});
  })
  </script>
{/block}